﻿/*include:js\declare*/
//鼠标覆盖处理	<div mouseover="{}" id="XXX"></div>
//fastCSharp.MouseOvers.XXX.OnOver=null;
(function(){
var MouseOver=function()
	{
	this.GetArgument(arguments[0],{Id:null,Event:null,OnOver:null,OnOut:null});
	this.OnOver=fastCSharp.Event().Add(this.OnOver);
	this.OnOut=fastCSharp.Event().Add(this.OnOut);
	this.Start(this.Event||{IsGetOnly:1});
	};
(fastCSharp.Functions.MouseOver=MouseOver).Inherit(fastCSharp.BaseFunction,{
Start:function(Event)
	{
	if(!Event.IsGetOnly)
		{
		var Element=fastCSharp.$Id(this.Id),Input=Element.Element();
		if(Input!=this.Element)
			{
			this.Element=Input;
			Element.AddEvent('mouseout',fastCSharp.ThisEvent(this,this.Out));
			}
		this.OnOver(Event,Element);
		}
	},
Out:function(Event)
	{
	this.OnOut(Event,fastCSharp.$Id(this.Id));
	}
		});
new fastCSharp.Declare('MouseOver','mouseover','AttributeName');
})();